package com.apes.auto.maintain.model;

import com.apes.framework.jpa.ApesBean;
import com.apes.framework.jpa.DefaultPersistListener;
import com.apes.framework.jpa.comment.Comment;
import com.apes.framework.jpa.generator.ApesGenerator;
import lombok.Getter;
import lombok.Setter;
import org.hibernate.annotations.DynamicInsert;
import org.hibernate.annotations.DynamicUpdate;
import org.hibernate.annotations.SelectBeforeUpdate;

import javax.persistence.*;

/**
 * @ClassName ERP保养数据行转列
 * @Description TODO
 * @Author pengyb
 * @Date 2019/9/20 14:15
 * @Version 1.0
 **/
@Getter
@Setter
@SelectBeforeUpdate
@DynamicInsert
@DynamicUpdate
@Entity
@EntityListeners(DefaultPersistListener.class)
@Table(name = PivotRule.CONST_TABLE_NAME)
public class PivotRule implements ApesBean {
    public static final String CONST_TABLE_NAME = "pivot_rule";

    @Id
    @Column(name = "id", length = 32)
    @ApesGenerator(code = CONST_TABLE_NAME, name = "ERP保养数据行转列规则")
    private String id;

    @Column(name = "BYZQBZD", length = 64)
    @Comment("byzqb-字段")
    private String BYZQBZD;

    @Column(name = "BYZQBZDMS", length = 64)
    @Comment("byzqb-字段描述")
    private String BYZQBZDMS;

    @Column(name = "PLID", length = 16)
    @Comment("品类ID")
    private String PLID;

    @Column(name = "PJMCID", length = 16)
    @Comment("配件名称ID")
    private String PJMCID;

    @Column(name = "PJMC", length = 64)
    @Comment("配件名称")
    private String PJMC;

    @Column(name = "SJPJMC", length = 2000)
    @Comment("上级配件名称")
    private String SJPJMC;

    @Column(name = "XTZDMS", length = 16)
    @Comment("ERP系统字段-中文")
    private String XTZDMS;

    @Column(name = "XTZD", length = 16)
    @Comment("ERP系统字段-英文")
    private String XTZD;

}
